﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _29属性的set与get方法
{
    class Program
    {
        static void Main(string[] args)
        {
            Car c = new Car();
            c.wheel = 60;
            Console.WriteLine(c.wheel);
            Console.ReadKey();
        }
    }
    
    class Car
    {
        public int wheels { get; set; }
        public int _wheel;
        public int wheel
        {
            get { return _wheel; }
            set
            {
                _wheel = value;
            }
        }
    }
    
}

